import request from '@/utils/request'

// 查询报告标题
export function fetchReportTitle(id) {
  return request({
    url:  '/report/info/'+id,
    method: 'GET',
  })
}

// 查询报告
export function reportList(data) {
  return request({
    url:  '/report/info/list',
    method: 'POST',
    data,
  })
}

// 查询热点报告-匿名
export function listPublicReport(data) {
  return request({
    url:  'report/info/listPublicReport',
    method: 'POST',
    data,
  })
}

// 新增报告
export function addreport(data) {
    return request({
      url:  '/report/info/create',
      method: 'POST',
      data,
    })
}




// 修改自定义提纲顺序
export function customSort(data) {
  return request({
    url:  '/report/custom/modify/sort',
    method: 'POST',
    data,
  })
}

// 删除报告
export function delreport(url) {
    return request({
      url:  '/report/info/'+url,
      method: 'DELETE',
    })
}
// 修改报告
export function editreport(data) {
  return request({
    url:  '/report/info/edit',
    method: 'POST',
    data,
  })
}

// 删除分析数据集
export function editanalysis(data) {
    return request({
      url:  '/analysis/dataset/edit',
      method: 'POST',
      data,
    })
}

// 获取专利内容信息
export function getReportContent(data) {
  return request({
    url:  '/report/content/getReportContent',
    method: 'POST',
    data,
  })
}

// 另存报告
export function saveReport(data) {
  return request({
    url:  '/report/info/saveas',
    method: 'POST',
    data,
  })
}

// 修改自定义参数
export function changeReport(params) {
  return request({
    url:  '/report/param/custom/edit',
    method: 'POST',
    data:params,
  })
}

// 修改自定义提纲顺序
export function sortModify(params) {
  return request({
    url:  '/report/custom/modify/sort',
    method: 'POST',
    data:params,
  })
}

// 获取演化分析实体聚类类型
export function fetchEntityTypes(data) {
  return request({
    url:  '/report/param/custom/getEntityTypes',
    method: 'POST',
    data,
  })
}

// 报告图片上传
export function uploadReportImage(data) {
  return request({
    url:  '/report/content/uploadReportImage',
    method: 'POST',
		headers:{
			"Content-Type":"multipart/form-data"
		},
    data,
  })
}



// 报告图片上传
export function exportWord(data) {
  return request({
    url:  '/report/info/exportWord',
    method: 'POST',
    data,
		responseType:'blob',
		hideloading:123
  })
}

//获取聚类 关键词
export function getClusterkeywords(data) {
  return request({
    url:  '/report/content/getClusterKeywords',
    method: 'POST',
    data,
  })
}

// 获取聚类 专利
export function getClusterPatents(data) {
  return request({
    url:  '/report/content/getClusterPatents',
    method: 'POST',
    data,
  })
}

//获取演化 关键词
export function getPathKeywords(data) {
  return request({
    url:  '/report/content/getPathKeywords',
    method: 'POST',
    data,
  })
}

// 获取演化 专利
export function getPathPatents(data) {
  return request({
    url:  '/report/content/getPathPatents',
    method: 'POST',
    data,
  })
}
// 修改类名

export function editClusterName(data) {
  return request({
    url:  '/report/content/editClusterName',
    method: 'POST',
    data,
  })
}
